<template>
  <basicModal @register="modalRegister" ref="modalRef" class="basicModal" @on-ok="okModal">
    <template #default>
      <n-card :bordered="false" title="是否入库">
        <n-radio-group v-model:value="status" name="radiogroup">
          <n-space>
            <n-radio :value="0">
              否
            </n-radio>
            <n-radio :value="1">
              是
            </n-radio>
          </n-space>
        </n-radio-group>
      </n-card>
    </template>
  </basicModal>
</template>

<script lang="ts" setup>
import {useModal} from '@/components/Modal';
import {propTypes} from "@/utils/propTypes";
import mitt from "mitt";
const Mit = mitt()
const modalRef: any = ref(null);
const [modalRegister, {openModal, closeModal, setSubLoading}] = useModal({
  title: '批量审核',
});

const props = defineProps({
  status:propTypes.number.def(0),
})
const status = ref(0)
status.value = props.status
const emits = defineEmits(['submit'])

function showModal() {
  openModal();
}
function okModal() {
  Mit.emit('submit', status.value)
  closeModal()
}

defineExpose({
  showModal
})
</script>

<style scoped>

</style>
